/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ships.io.stream;

import java.io.IOException;
import java.nio.ByteOrder;
import java.util.Stack;

/**
 *
 * @author fqhuy
 */
public class ImageInputStreamImpl implements ImageInputStream{
    private Stack markByteStack = new Stack();

    private Stack markBitStack = new Stack();

    private boolean isClosed = false;

    // Length of the buffer used for readFully(type[], int, int)
    private static final int BYTE_BUF_LENGTH = 8192;

    /**
     * Byte buffer used for readFully(type[], int, int).  Note that this
     * array is also used for bulk reads in readShort(), readInt(), etc, so
     * it should be large enough to hold a primitive value (i.e. >= 8 bytes).
     * Also note that this array is package protected, so that it can be
     * used by ImageOutputStreamImpl in a similar manner.
     */
    byte[] byteBuf = new byte[BYTE_BUF_LENGTH];

    /**
     * The byte order of the stream as an instance of the enumeration
     * class <code>java.nio.ByteOrder</code>, where
     * <code>ByteOrder.BIG_ENDIAN</code> indicates network byte order
     * and <code>ByteOrder.LITTLE_ENDIAN</code> indicates the reverse
     * order.  By default, the value is
     * <code>ByteOrder.BIG_ENDIAN</code>.
     */
    protected ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;

    /**
     * The current read position within the stream.  Subclasses are
     * responsible for keeping this value current from any method they
     * override that alters the read position.
     */
    protected long streamPos;

    /**
     * The current bit offset within the stream.  Subclasses are
     * responsible for keeping this value current from any method they
     * override that alters the bit offset.
     */
    protected int bitOffset;

    /**
     * The position prior to which data may be discarded.  Seeking
     * to a smaller position is not allowed.  <code>flushedPos</code>
     * will always be >= 0.
     */
    protected long flushedPos = 0;

    public void readFully(byte[] b) throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void readFully(byte[] b, int off, int len) throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int skipBytes(int n) throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public boolean readBoolean() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public byte readByte() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int readUnsignedByte() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public short readShort() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int readUnsignedShort() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public char readChar() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int readInt() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public long readLong() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public float readFloat() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public double readDouble() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String readLine() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String readUTF() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public long getStreamPosition() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int read() throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void flushBefore(long streamPosition) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int read(byte[] b, int off, int len) throws IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void seek(long l) throws IOException{
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
